Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse long.MinValue in Design Script #11122

Merged
merged 2 commits into from
Sep 16, 2020
Merged

Conversation

mmisol
Copy link
Collaborator

@mmisol mmisol commented Sep 16, 2020

Purpose

Values of type long were parsed in a two-step process where the unsigned
value was parsed first and then multiplied by its sign if present. This
type of processing did not work for -9223372036854775808, as its
unsigned value is not a valid long. The issue is fixed by prepending
the '-' sign in case the number is negative before parsing it.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Reviewers

@aparajit-pratap @QilongTang

FYIs

@DynamoDS/dynamo

Values of type long were parsed in a two-step process were the unsigned
value was parsed first and then multiplied by its sign if present. This
type of processing did not work for -9223372036854775808, as its
unsigned value is not a valid long. The issue is fixed by prepending
the '-' sign in case the number is negative before parsing it.
Copy link
Contributor

@aparajit-pratap aparajit-pratap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmisol thanks for the fix. Just want to make sure you ran the coco.exe parser generator on the atgs in order to generate the parser.cs file and have not edited it manually.

@mmisol
Copy link
Collaborator Author

mmisol commented Sep 16, 2020

@aparajit-pratap Yes, I used the bat file named GenerateParser.bat

@mmisol mmisol merged commit 7b098a9 into DynamoDS:master Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants